Programmable controllers are specialized computers used for controlling an industrial process, such as an assembly line, in accordance with a stored program. Under the direction of the stored program, the programmable controller examines a series of inputs, reflecting the status of the industrial process, and changes a series of outputs, controlling the industrial process.
Programmable controllers are typically programmed in a "relay ladder" language. This language, which has become an accepted standard in industry, employs instructions represented by "contacts" and "coils" of virtual relays connected arranged in ladder-like "rungs". A relatively small number of basic ladder logic instructions provide a complete set of Boolean "primitives" from which complex control programs may be crafted. The core instructions include XIC contacts ("Examine If Closed"), XIO contacts ("Examine If Open"), and OTE coils ("Output Enable"). The former two instructions check the state of a binary input and are graphically represented by either normally open or normally closed contacts in the relay ladder diagram. The latter instruction identifies the state of an output and is graphically represented by a coil. Other "coil" instructions include the OTL coil ("Output Latch") and OTU coil ("Output Unlatch").
Over the years, special purpose instructions that permit: counting, timing, simple mathematics (including comparisons of numbers, addition and subtraction) and basic Boolean manipulation have augmented these basic relay ladder logic instructions. These commonly used instructions together with the more basic instructions described initially will henceforth be collectively termed "relay ladder instructions" reflecting their common usage and heritage.
With increasing overlap between the technologies of programmable controllers and conventional computers, a demand for programmable controllers that recognize traditional computer-like instructions has arisen. Accordingly, present day programmable controllers are also capable of implementing a variety of non-traditional instructions, other than relay ladder instructions, that permit more complex mathematical manipulation, such as multiplication, division, and taking a square root, as well as basic machine language instructions such as shift left and right, jumping (to subroutines) and those implementing communication protocols. These additional instructions will henceforth be referred to as "general instructions".
The availability of regularly succeeding generations of increasingly powerful yet inexpensive general purpose microprocessors, has made it desirable to construct a programmable controller using an off-the-shelf microprocessor to execute traditional relay logic instructions. In such a microprocessor based machine, each relay language instruction is interpreted or compiled to the native machine language of the microprocessor prior to execution on that microprocessor. A given relay language instruction may be realized as multiple machine instructions. These compiled or interpreted instructions will be termed "micro-instructions" to distinguish them from the source relay ladder instructions from which they were derived.
Although this use of microprocessors can significantly reduce the cost of a programmable controller, it normally comes at the cost of reduced performance. The need to execute multiple micro-instructions for each relay language instruction interposes delay in the execution of the overall program. This may detrimentally affect the ability of the programmable controller to execute complex tasks with more inputs and outputs and yet to maintain near real-time control.